import { Engine, Stage } from 'babylon-lib/index';
import { UIRootTool } from 'babylon-lib/highly-coupled-component/gui-tool/ui-root-tool';
import { UIContainer } from 'babylon-lib/gui/base/ui-container';
import { MainStageUI } from './ui/main-stage-ui';
import { RawData } from './raw-assets-info';
import * as Data from './data/data';


class AppUI extends UIRootTool {

    protected initializeUIContainers(engine: Engine, stages: Stage[]): UIContainer[] {
        return [
            new MainStageUI(engine, stages[0], this,
                {
                    isOriginalQr: false,
                    appName: RawData.appConfig.name,
                }
            ),
        ];
    }

    /**
     * 使用默认沉浸引导ui和XRStage后，不再需要在此处通过数据处理重置、切换沉浸模式等操作，但响应函数仍然可以用来处理额外的逻辑
     */
    public onBootImmersiveButtonsClick(stage: Stage, immersive: boolean): void {
        console.log('沉浸模式引导UI被点击了');
    }

    public onResetStageButtonClick(stage: Stage): void {
        console.log('点击了重置按钮');
    }
}


export { AppUI };